Open
Conversation
…exports in logic.ts to use core package - Deleted calibration.ts, personalModel.ts, pk.ts, and types.ts to streamline the codebase. - Updated logic.ts to re-export all necessary types and functions from the new @hrt-tracker/core package. - Added .pnpm-store to .gitignore to exclude local package store from version control.
- Updated exports in index.ts to include .js extensions for clarity and added new utility modules. - Refactored AppDataContext to import computeDataHash from logic instead of utils. - Simplified authSessionState by re-exporting functions from logic. - Replaced custom encryption functions in crypto with imports from logic. - Deleted unused dataHash.ts file to clean up the codebase. - Updated helpers.tsx to re-export bio dose and raw dose calculation functions from logic.
…nd SettingsPage - Updated CloudSyncContext to import computeDataHash and isLogoutInProgress from the logic module. - Streamlined imports in SettingsPage by consolidating utility functions from logic.
…ata.json - Changed flag imports in SettingsPage from emoji-based filenames to standardized country code filenames. - Deleted metadata.json as it was no longer needed.
- Deleted index.html, index.tsx, logic.ts, and several other files to streamline the codebase. - Updated package.json to reflect new project name and dependencies, switching to Turbo for task management. - Adjusted pnpm workspace configuration to include apps/* for better organization. - Removed unused assets and configuration files to clean up the project structure.
Contributor
|
Thank you for taking the time to work on this refactor. The overall architectural direction makes sense, but given that this project is currently maintained by a very small team, the operational overhead introduced by Turbo and pnpm workspaces is more than we need at this stage. The core logic files are still fairly small, so there is no real need for physical package separation for now, and we also do not currently have a need to support multiple clients. Because of that, this change feels a bit too heavy for the project’s current state. In my view, the refactor is not especially necessary at the moment and would also increase maintenance complexity. That said, I still really appreciate the work you put into it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog
[Major Refactor] Monorepo Migration and Project Restructuring
🏗 Architecture & Infrastructure
pnpmworkspaces andTurbo.@hrt-tracker/core: Contains shared logic, PK (Pharmacokinetics) models, calibration, and encryption utilities.hrttracker(App): Moved the main React application toapps/hrttracker.worker: Moved Cloudflare Workers logic topackages/worker.Turbofor optimized build and development pipelines.package.jsonand updatedpnpm-lock.yaml.🛠 Refactoring & Code Quality
tsconfigstructures with a base configuration (tsconfig.base.json) inherited by sub-packages.🔐 Security & Utilities
dataHash,authSessionState, andcryptoto the core package for better reusability.🎨 Assets & UI
apps/hrttracker/src/assets/flags/) and renamed them with ISO country codes for better maintainability.SettingsPageand other components to reflect the new asset paths and consolidated logic imports.⚙️ Configuration
.gitignoreto include.pnpm-store,.turbo, and.wrangler.tauri.conf.jsonto point to the new application paths.